﻿// Copyright 2009 Mike Geise
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Falcon.Forums.Domain.Services
{
	using System.Collections.Generic;
	using Falcon.Forums.Domain.Values;

	public interface IForumService
	{
		/// <summary>
		/// Gets the forum by the specified specification.
		/// </summary>
		/// <param name="specification">The specification.</param>
		/// <returns></returns>
		Forum GetBy(ForumSpecification specification);

		/// <summary>
		/// Gets the forum by id.
		/// </summary>
		/// <param name="id">The id.</param>
		Forum GetById(int id);

		/// <summary>
		/// Gets the forum by id.
		/// </summary>
		/// <param name="id">The id.</param>
		/// <param name="skipPermissions">if set to <c>true</c> [skip permissions].</param>
		/// <returns></returns>
		Forum GetById(int id, bool skipPermissions);

		/// <summary>
		/// Gets all the forums.
		/// </summary>
		IList<Forum> GetAll();

		/// <summary>
		/// Gets all the forums by the specified specification.
		/// </summary>
		/// <param name="specification">The specification.</param>
		IList<Forum> GetAll(ForumSpecification specification);

		/// <summary>
		/// Creates the forum.
		/// </summary>
		Forum Create();

		/// <summary>
		/// Inserts the forum into the storage.
		/// </summary>
		/// <param name="forum">The <see cref="Forum"/>.</param>
		void Insert(Forum forum);

		/// <summary>
		/// Inserts the forum into the storage.
		/// </summary>
		/// <param name="forum">The <see cref="Forum"/>.</param>
		/// <param name="value">The <see cref="ForumCreate"/>.</param>
		void Insert(Forum forum, ForumCreate value);

		/// <summary>
		/// Updates the specified forum in the storage.
		/// </summary>
		/// <param name="forum">The <see cref="Forum"/>.</param>
		void Update(Forum forum);

		/// <summary>
		/// Updates the specified forum in the storage.
		/// </summary>
		/// <param name="forum">The <see cref="Forum"/>.</param>
		/// <param name="value">The <see cref="ForumUpdate"/>.</param>
		void Update(Forum forum, ForumUpdate value);

		/// <summary>
		/// Updates the forums order.
		/// </summary>
		/// <param name="values">The values.</param>
		void Update(ForumUpdateOrder[] values);

		/// <summary>
		/// Deletes the specified forum in the storage.
		/// </summary>
		/// <param name="forum">The <see cref="Forum"/>.</param>
		void Delete(Forum forum);

		/// <summary>
		/// Marks the forum as read.
		/// </summary>
		/// <param name="forum">The forum.</param>
		void MarkRead(Forum forum);
	}
}